<!DOCTYPE HTML><html lang="en"><head><meta charset="UTF-8"><meta content="text/html; charset=utf-8"http-equiv="Content-Type"><title>Camera Protocol v2 · MAVLink Developer Guide</title><meta content="IE=edge"http-equiv="X-UA-Compatible"/><meta content=""name="description"><meta content="GitBook 3.2.3"name="generator"><link href="../../gitbook/style.css"rel="stylesheet"><link href="../../gitbook/gitbook-plugin-anchors/plugin.css"rel="stylesheet"><link href="../../gitbook/gitbook-plugin-page-toc-button/plugin.css"rel="stylesheet"><link href="../../gitbook/gitbook-plugin-language-picker/plugin.css"rel="stylesheet"><link href="../../gitbook/gitbook-plugin-richquotes/plugin.css"rel="stylesheet"><link href="../../gitbook/gitbook-plugin-highlight/website.css"rel="stylesheet"><link href="../../gitbook/gitbook-plugin-search/search.css"rel="stylesheet"><link href="../../gitbook/gitbook-plugin-fontsettings/website.css"rel="stylesheet"><link href="../../gitbook/gitbook-plugin-theme-api/theme-api.css"rel="stylesheet"><link href="../../gitbook/gitbook-plugin-theme-dronecode/theme_styles.css"rel="stylesheet"><meta content="true"name="HandheldFriendly"/><meta content="width=device-width,initial-scale=1,user-scalable=no"name="viewport"><meta content="yes"name="apple-mobile-web-app-capable"><meta content="black"name="apple-mobile-web-app-status-bar-style"><link href="../../gitbook/images/apple-touch-icon-precomposed-152.png"rel="apple-touch-icon-precomposed"sizes="152x152"><link href="../../gitbook/images/favicon.ico"rel="shortcut icon"type="image/x-icon"><link href="camera_def.html"rel="next"/><link href="manual_control.html"rel="prev"/></head><body><div id="common_dronecode_menu"><div class="large_version common_menu_logo"><a href="https://mavlink.io/en/"><img alt="Dronecode logo (large)"src="../../assets/site/logo_mavlink_header.png"/></a></div><div class="small_version common_menu_logo"><a href="https://mavlink.io/en/"><img alt="Dronecode logo (small)"src="../../assets/site/logo_mavlink_header.png"/></a></div><div class="common_menu_options"><div class="common_dronecode_menu_item large_version"><a href="https://mavlink.io/en/messages/common.html">Messages</a></div><div class="common_dronecode_menu_item small_version"><a href="https://mavlink.io/en/messages/common.html">Messages</a></div><div class="common_dronecode_menu_item large_version"><a href="https://mavlink.io/en/about/faq.html">FAQ</a></div><div class="common_dronecode_menu_item small_version"><a href="https://mavlink.io/en/about/faq.html">FAQ</a></div><div class="common_dronecode_menu_item large_version"><a href="https://mavlink.io/en/about/implementations.html">Implementations</a></div><div class="common_dronecode_menu_item small_version"><a href="https://mavlink.io/en/about/implementations.html">Implementations</a></div><div class="common_dronecode_menu_item large_version"><a href="https://mavlink.io/en/mavgen_c/examples.html">Examples</a></div><div class="common_dronecode_menu_item small_version"><a href="https://mavlink.io/en/mavgen_c/examples.html">Examples</a></div><div class="common_dronecode_menu_item large_version"><a href="https://mavlink.io/en/about/support.html">Support</a></div><div class="common_dronecode_menu_item small_version"><a href="https://mavlink.io/en/about/support.html">Help</a></div></div></div><div class="book"><div class="book-summary"><div id="book-search-input"role="search"><input placeholder="Type to search"type="text"/></div><nav role="navigation"><ul class="summary"><li class="chapter"data-level="1.1"data-path="../"><a href="../">Introduction</a><ul class="articles"><li class="chapter"data-level="1.1.1"data-path="../about/overview.html"><a href="../about/overview.html">Overview</a></li><li class="chapter"data-level="1.1.2"data-path="../about/faq.html"><a href="../about/faq.html">FAQ</a></li><li class="chapter"data-level="1.1.3"data-path="../about/implementations.html"><a href="../about/implementations.html">Implementations</a></li></ul></li><li class="chapter"data-level="1.2"data-path="../getting_started/"><a href="../getting_started/">Getting Started</a><ul class="articles"><li class="chapter"data-level="1.2.1"data-path="../getting_started/installation.html"><a href="../getting_started/installation.html">Install MAVLink</a></li><li class="chapter"data-level="1.2.2"data-path="../getting_started/generate_libraries.html"><a href="../getting_started/generate_libraries.html">Generate MAVLink Libraries</a></li><li class="chapter"data-level="1.2.3"data-path="../getting_started/ros.html"><a href="../getting_started/ros.html">Generate Source Files for ROS</a></li></ul></li><li class="chapter"data-level="1.3"data-path="../getting_started/use_libraries.html"><a href="../getting_started/use_libraries.html">Using MAVLink Libraries</a><ul class="articles"><li class="chapter"data-level="1.3.1"data-path="../mavgen_c/"><a href="../mavgen_c/">C (mavgen)</a><ul class="articles"><li class="chapter"data-level="1.3.1.1"data-path="../mavgen_c/message_signing_c.html"><a href="../mavgen_c/message_signing_c.html">Message Signing</a></li><li class="chapter"data-level="1.3.1.2"data-path="../mavgen_c/examples.html"><a href="../mavgen_c/examples.html">Examples</a><ul class="articles"><li class="chapter"data-level="1.3.1.2.1"data-path="../mavgen_c/example_c_uart.html"><a href="../mavgen_c/example_c_uart.html">UART Interface (C)</a></li><li class="chapter"data-level="1.3.1.2.2"data-path="../mavgen_c/example_c_udp.html"><a href="../mavgen_c/example_c_udp.html">UDP Example (C)</a></li></ul></li></ul></li><li class="chapter"data-level="1.3.2"data-path="../mavgen_python/"><a href="../mavgen_python/">Pymavlink (Python-mavgen)</a><ul class="articles"><li class="chapter"data-level="1.3.2.1"data-path="../mavgen_python/howto_requestmessages.html"><a href="../mavgen_python/howto_requestmessages.html">How to Request Messages/Set Message Rates</a></li><li class="chapter"data-level="1.3.2.2"data-path="../mavgen_python/message_signing.html"><a href="../mavgen_python/message_signing.html">Message Signing</a></li><li class="chapter"data-level="1.3.2.3"data-path="../mavgen_python/examples.html"><a href="../mavgen_python/examples.html">Examples</a></li></ul></li></ul></li><li class="chapter"data-level="1.4"data-path="../guide/"><a href="../guide/">Guide</a><ul class="articles"><li class="chapter"data-level="1.4.1"data-path="../guide/mavlink_version.html"><a href="../guide/mavlink_version.html">MAVLink Versions</a></li><li class="chapter"data-level="1.4.2"data-path="../guide/mavlink_2.html"><a href="../guide/mavlink_2.html">MAVLink 2</a></li><li class="chapter"data-level="1.4.3"data-path="../guide/message_signing.html"><a href="../guide/message_signing.html">Message Signing</a></li><li class="chapter"data-level="1.4.4"data-path="../guide/serialization.html"><a href="../guide/serialization.html">Serialization</a></li><li class="chapter"data-level="1.4.5"data-path="../guide/routing.html"><a href="../guide/routing.html">Routing</a></li><li class="chapter"data-level="1.4.6"data-path="../guide/redundancy_deduplication.html"><a href="../guide/redundancy_deduplication.html">Redundancy/Message De-duplication</a></li><li class="chapter"data-level="1.4.7"data-path="../guide/packet_loss.html"><a href="../guide/packet_loss.html">Packet Loss Calculation</a></li><li class="chapter"data-level="1.4.8"data-path="../guide/general_telemetry.html"><a href="../guide/general_telemetry.html">General Telemetry</a></li><li class="chapter"data-level="1.4.9"data-path="../file_formats/"><a href="../file_formats/">File Formats</a></li><li class="chapter"data-level="1.4.10"data-path="../guide/uavcan_interaction.html"><a href="../guide/uavcan_interaction.html">UAVCAN Interaction</a></li><li class="chapter"data-level="1.4.11"data-path="../guide/scripts.html"><a href="../guide/scripts.html">Scripts</a></li><li class="chapter"data-level="1.4.12"data-path="../guide/xml_schema.html"><a href="../guide/xml_schema.html">MAVLink XML Schema</a></li><li class="chapter"data-level="1.4.13"data-path="../guide/define_xml_element.html"><a href="../guide/define_xml_element.html">Defining XML Enums/Messages</a></li><li class="chapter"data-level="1.4.14"data-path="../guide/crc.html"><a href="../guide/crc.html">MAVLink CRC</a></li><li class="chapter"data-level="1.4.15"data-path="../guide/wireshark.html"><a href="../guide/wireshark.html">Debugging with Wireshark</a></li><li class="chapter"data-level="1.4.16"data-path="../messages/"><a href="../messages/">Dialects</a><ul class="articles"><li class="chapter"data-level="1.4.16.1"data-path="../messages/ASLUAV.html"><a href="../messages/ASLUAV.html">ASLUAV.xml</a></li><li class="chapter"data-level="1.4.16.2"data-path="../messages/all.html"><a href="../messages/all.html">all.xml</a></li><li class="chapter"data-level="1.4.16.3"data-path="../messages/ardupilotmega.html"><a href="../messages/ardupilotmega.html">ardupilotmega.xml</a></li><li class="chapter"data-level="1.4.16.4"data-path="../messages/development.html"><a href="../messages/development.html">development.xml</a></li><li class="chapter"data-level="1.4.16.5"data-path="../messages/icarous.html"><a href="../messages/icarous.html">icarous.xml</a></li><li class="chapter"data-level="1.4.16.6"data-path="../messages/matrixpilot.html"><a href="../messages/matrixpilot.html">matrixpilot.xml</a></li><li class="chapter"data-level="1.4.16.7"data-path="../messages/minimal.html"><a href="../messages/minimal.html">minimal.xml</a></li><li class="chapter"data-level="1.4.16.8"data-path="../messages/paparazzi.html"><a href="../messages/paparazzi.html">paparazzi.xml</a></li><li class="chapter"data-level="1.4.16.9"data-path="../messages/python_array_test.html"><a href="../messages/python_array_test.html">python_array_test.xml</a></li><li class="chapter"data-level="1.4.16.10"data-path="../messages/standard.html"><a href="../messages/standard.html">standard.xml</a></li><li class="chapter"data-level="1.4.16.11"data-path="../messages/test.html"><a href="../messages/test.html">test.xml</a></li><li class="chapter"data-level="1.4.16.12"data-path="../messages/uAvionix.html"><a href="../messages/uAvionix.html">uAvionix.xml</a></li><li class="chapter"data-level="1.4.16.13"data-path="../messages/ualberta.html"><a href="../messages/ualberta.html">ualberta.xml</a></li></ul></li></ul></li><li class="chapter"data-level="1.5"data-path="../messages/common.html"><a href="../messages/common.html">Messages (common)</a></li><li class="chapter"data-level="1.6"data-path="./"><a href="./">Microservices</a><ul class="articles"><li class="chapter"data-level="1.6.1"data-path="heartbeat.html"><a href="heartbeat.html">Heartbeat/Connection Protocol</a></li><li class="chapter"data-level="1.6.2"data-path="mission.html"><a href="mission.html">Mission Protocol</a></li><li class="chapter"data-level="1.6.3"data-path="parameter.html"><a href="parameter.html">Parameter Protocol</a></li><li class="chapter"data-level="1.6.4"data-path="parameter_ext.html"><a href="parameter_ext.html">Extended Parameter Protocol</a></li><li class="chapter"data-level="1.6.5"data-path="command.html"><a href="command.html">Command Protocol</a></li><li class="chapter"data-level="1.6.6"data-path="manual_control.html"><a href="manual_control.html">Manual Control (Joystick) Protocol</a></li><li class="chapter active"data-level="1.6.7"data-path="camera.html"><a href="camera.html">Camera Protocol v2</a><ul class="articles"><li class="chapter"data-level="1.6.7.1"data-path="camera_def.html"><a href="camera_def.html">Camera Definition Files</a></li></ul></li><li class="chapter"data-level="1.6.8"data-path="camera_v1.html"><a href="camera_v1.html">Camera Protocol v1 (Simple Trigger Protocol)</a></li><li class="chapter"data-level="1.6.9"data-path="gimbal_v2.html"><a href="gimbal_v2.html">Gimbal Protocol v2</a><ul class="articles"><li class="chapter"data-level="1.6.9.1"data-path="gimbal.html"><a href="gimbal.html">Gimbal Protocol v1 (superseded)</a></li></ul></li><li class="chapter"data-level="1.6.10"data-path="arm_authorization.html"><a href="arm_authorization.html">Arm Authorization Protocol</a></li><li class="chapter"data-level="1.6.11"data-path="illuminator.html"><a href="illuminator.html">Illuminator Protocol</a></li><li class="chapter"data-level="1.6.12"data-path="image_transmission.html"><a href="image_transmission.html">Image Transmission Protocol</a></li><li class="chapter"data-level="1.6.13"data-path="offboard_control.html"><a href="offboard_control.html">Offboard Control Protocol</a></li><li class="chapter"data-level="1.6.14"data-path="ftp.html"><a href="ftp.html">File Transfer Protocol (FTP)</a></li><li class="chapter"data-level="1.6.15"data-path="landing_target.html"><a href="landing_target.html">Landing Target Protocol</a></li><li class="chapter"data-level="1.6.16"data-path="ping.html"><a href="ping.html">Ping Protocol</a></li><li class="chapter"data-level="1.6.17"data-path="trajectory.html"><a href="trajectory.html">Path Planning (Trajectory) Protocol</a></li><li class="chapter"data-level="1.6.18"data-path="battery.html"><a href="battery.html">Battery Protocol</a></li><li class="chapter"data-level="1.6.19"data-path="terrain.html"><a href="terrain.html">Terrain Protocol</a></li><li class="chapter"data-level="1.6.20"data-path="tunnel.html"><a href="tunnel.html">Tunnel Protocol</a></li><li class="chapter"data-level="1.6.21"data-path="opendroneid.html"><a href="opendroneid.html">Open Drone ID Protocol</a></li><li class="chapter"data-level="1.6.22"data-path="high_latency.html"><a href="high_latency.html">High Latency Protocol</a></li><li class="chapter"data-level="1.6.23"data-path="component_information.html"><a href="component_information.html">Component Metadata Protocol (WIP)</a></li><li class="chapter"data-level="1.6.24"data-path="mavlink_id_assignment.html"><a href="mavlink_id_assignment.html">MAVLink Id Assignment (sysid, compid)</a></li><li class="chapter"data-level="1.6.25"data-path="payload.html"><a href="payload.html">Payload Protocols</a></li><li class="chapter"data-level="1.6.26"data-path="traffic_management.html"><a href="traffic_management.html">Traffic Management (UTM/ADS-B)</a></li><li class="chapter"data-level="1.6.27"data-path="events.html"><a href="events.html">Events Interface (WIP)</a></li><li class="chapter"data-level="1.6.28"data-path="timesync.html"><a href="timesync.html">Time Synchronization</a></li></ul></li><li class="chapter"data-level="1.7"data-path="../contributing/contributing.html"><a href="../contributing/contributing.html">Contributing</a></li><li class="chapter"data-level="1.8"data-path="../about/support.html"><a href="../about/support.html">Support</a></li><li class="divider"></li><li><a href="https://www.gitbook.com"class="gitbook-link"target="blank">Published with GitBook</a></li></ul></nav></div><div class="book-body"><div class="body-inner"><div class="book-header"role="navigation"><h1><i class="fa fa-circle-o-notch fa-spin"></i> <a href="..">Camera Protocol v2</a></h1></div><div class="page-wrapper"role="main"tabindex="-1"><div class="page-inner"><div id="book-search-results"><div class="search-noresults"><section class="markdown-section normal"><h1 id="camera-protocol-v2"><a href="#camera-protocol-v2"class="plugin-anchor"name="camera-protocol-v2"><i class="fa fa-link"aria-hidden="true"></i></a>Camera Protocol v2</h1><p>The camera protocol v2 is used to configure camera payloads and request their status. It provides basic methods for photo capture, video capture and streaming, setting zoom and focus, querying and configuring camera storage, and selecting multiple cameras. It also defines a camera definition file format that allows a GCS to generate a configuration UI for setting any property of the camera using parameters.</p><blockquote class="alert clearfix alert-info"><strong class="fa fa-2x fa-edit"></strong><p>This protocol supersedes <a href="camera_v1.html">Camera Protocol v1 (Simple Trigger Protocol)</a>. The older protocol enables camera triggering, but does not support other features or querying camera capabilities.</p></blockquote><p><span></span></p><blockquote class="alert clearfix alert-warning"><strong class="fa fa-2x fa-exclamation-triangle"></strong><p>We are transitioning from specific request commands to a single generic requestor. GCS and MAVLink SDKs/apps should support both approaches as we migrate to exclusive use of the new method (documented here). For more information see <a href="#migration-notes-for-gcs--mavlink-sdks">Migration Notes for GCS &amp; Camera Servers</a>.</p></blockquote><h2 id="mavlink-camera-implementations"><a href="#mavlink-camera-implementations"class="plugin-anchor"name="mavlink-camera-implementations"><i class="fa fa-link"aria-hidden="true"></i></a>MAVLink Camera Implementations</h2><p>Camera Managers provide a MAVLink Camera protocol interface for cameras that don&apos;t directly implement MAVLink support. These generally run on a companion computer:</p><ul><li><a href="https://github.com/mavlink/mavlink-camera-manager"target="_blank">MAVLink Camera Manager</a> (actively maintained)</li><li><a href="https://camera-manager.dronecode.org/en/"target="_blank">Dronecode Camera Manager</a></li><li><a href="https://github.com/julianoes/siyi-a8-mini-camera-manager"target="_blank">SIYI A8 mini camera manager</a> - MAVSDK-plugin based camera manager for the <a href="https://shop.siyi.biz/products/siyi-a8-mini"target="_blank">SIYI A8 mini</a> (includes tutorial).</li></ul><p>These cameras have inbuilt support for MAVLink (but not necessarily camera protocol v2):</p><ul><li><a href="https://geospatial.phaseone.com/"target="_blank">PhaseOne Cameras</a> (<a href="https://geospatial.phaseone.com/resources-support/developer/mavlink/"target="_blank">source</a>).</li><li><a href="https://www.drone-thermal-camera.com/"target="_blank">Workswell cameras</a>: WIRIS Pro, WIRIS Pro SC, WIRIS Security, WIRIS Agro, GIS-320 (<a href="https://www.drone-thermal-camera.com/mavlink-interface-for-uav-cameras/"target="_blank">source</a>).</li></ul><h2 id="camera-discoveryconnection"><a href="#camera-discoveryconnection"class="plugin-anchor"name="camera-discoveryconnection"><i class="fa fa-link"aria-hidden="true"></i></a>Camera Discovery/Connection</h2><p>Camera components are expected to follow the <a href="heartbeat.html">Heartbeat/Connection Protocol</a> and sent a constant flow of heartbeats (nominally at 1Hz). Cameras must set a <a href="../messages/common.html#HEARTBEAT">HEARTBEAT.type</a> of <a href="../messages/common.html#MAV_TYPE_CAMERA">MAV_TYPE_CAMERA</a>. Each camera must use a different pre-defined camera component ID. Values of <a href="../messages/common.html#MAV_COMP_ID_CAMERA">MAV_COMP_ID_CAMERA</a> to <a href="../messages/common.html#MAV_COMP_ID_CAMERA6">MAV_COMP_ID_CAMERA6</a> are recommended, but in theory any camera ID may be used.</p><p>The first time a heartbeat is detected from a new camera, a GCS (or other receiving system) should start the <a href="#camera_identification">Camera Identification</a> process.</p><blockquote class="alert clearfix alert-info"><strong class="fa fa-2x fa-edit"></strong><p>If a receiving system stops receiving heartbeats from the camera it is assumed to be <em>disconnected</em>, and should be removed from the list of available cameras. If heartbeats are again detected, the <em>camera identification</em> process below must be restarted from the beginning.</p></blockquote><h2 id="basic-camera-operations"><a href="#basic-camera-operations"class="plugin-anchor"name="basic-camera-operations"><i class="fa fa-link"aria-hidden="true"></i></a>Basic Camera Operations</h2><p>The <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION.flags</a> provides information about camera capabilities. It contains a bitmap of <a href="../messages/common.html#CAMERA_CAP_FLAGS">CAMERA_CAP_FLAGS</a> values that tell the GCS if the camera supports still image capture, video capture, or video streaming, and if it needs to be in a certain mode for capture, etc.</p><h3 id="camera_identification"><a href="#camera_identification"class="plugin-anchor"name="camera_identification"><i class="fa fa-link"aria-hidden="true"></i></a>Camera Identification</h3><p>The camera identification operation identifies all the available cameras and determines their capabilities.</p><blockquote class="alert clearfix alert-success"><strong class="fa fa-2x fa-thumbs-o-up"></strong><p>Camera identification must be carried out before all other operations!</p></blockquote><p>The first time a heartbeat is received from a new camera component, the GCS will send it a <a href="../messages/common.html#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a> message asking for <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION</a> (message id 259). The camera will then respond with the a <a href="../messages/common.html#COMMAND_ACK">COMMAND_ACK</a> message containing a result. On success (result is <a href="../messages/common.html#MAV_RESULT_ACCEPTED">MAV_RESULT_ACCEPTED</a>) the camera component must then send a <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION</a> message.</p><p><a href="https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIENhbWVyYS0-PkdDUzogSEVBUlRCRUFUIFtjbXAgaWQ6IE1BVl9DT01QX0lEX0NBTUVSQV0gKGZpcnN0KSBcbiAgICBHQ1MtPj5DYW1lcmE6IE1BVl9DTURfUkVRVUVTVF9NRVNTQUdFKHBhcmFtMT0yNTkpXG4gICAgR0NTLT4-R0NTOiBTdGFydCB0aW1lb3V0XG4gICAgQ2FtZXJhLT4-R0NTOiBDT01NQU5EX0FDS1xuICAgIE5vdGUgb3ZlciBDYW1lcmEsR0NTOiBJZiBNQVZfUkVTVUxUX0FDQ0VQVEVEIHNlbmQgaW5mby5cbiAgICBDYW1lcmEtPj5HQ1M6IENBTUVSQV9JTkZPUk1BVElPTiIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9"target="_blank"><img alt="Mermaid Sequence: Camera Id"src="https://mermaid.ink/img/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIENhbWVyYS0-PkdDUzogSEVBUlRCRUFUIFtjbXAgaWQ6IE1BVl9DT01QX0lEX0NBTUVSQV0gKGZpcnN0KSBcbiAgICBHQ1MtPj5DYW1lcmE6IE1BVl9DTURfUkVRVUVTVF9NRVNTQUdFKHBhcmFtMT0yNTkpXG4gICAgR0NTLT4-R0NTOiBTdGFydCB0aW1lb3V0XG4gICAgQ2FtZXJhLT4-R0NTOiBDT01NQU5EX0FDS1xuICAgIE5vdGUgb3ZlciBDYW1lcmEsR0NTOiBJZiBNQVZfUkVTVUxUX0FDQ0VQVEVEIHNlbmQgaW5mby5cbiAgICBDYW1lcmEtPj5HQ1M6IENBTUVSQV9JTkZPUk1BVElPTiIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9"></a></p><p>The operation follows the normal <a href="command.html">Command Protocol</a> rules for command/acknowledgment (if no <code>COMMAND_ACK</code> response is received for <code>MAV_CMD_REQUEST_MESSAGE</code> the command will be re-sent a number of times before failing). If <code>CAMERA_INFORMATION</code> is not received after receiving an ACK with <code>MAV_RESULT_ACCEPTED</code>, the protocol assumes the message was lost, and the cycle of sending <code>MAV_CMD_REQUEST_MESSAGE</code> is repeated. If <code>CAMERA_INFORMATION</code> is still not received after three cycle repeats, the GCS may assume that the camera is not supported.</p><p>The <code>CAMERA_INFORMATION</code> response contains the bare minimum information about the camera and what it can or cannot do. This is sufficient for basic image and/or video capture.</p><p>If a camera provides finer control over its settings <code>CAMERA_INFORMATION.cam_definition_uri</code> will include a URI to a <a href="camera_def.html">Camera Definition File</a>. If this URI exists, the GCS will request it, parse it and prepare the UI for the user to control the camera settings.</p><blockquote class="alert clearfix alert-info"><strong class="fa fa-2x fa-edit"></strong><p>A GCS that implements this protocol is expected to support both HTTP (<code>http://</code>) and <a href="ftp.html">MAVLink FTP</a> (<code>mftp://</code>) URIs for download of the camera definition file. If the camera provides an HTTP or MAVLink FTP interface, the definition file can be hosted on the camera itself. Otherwise, it can be <em>hosted</em> anywhere (on any reachable server).</p></blockquote><p>The <code>CAMERA_INFORMATION.cam_definition_version</code> field should provide a version for the definition file, allowing the GCS to cache it. Once downloaded, it would only be requested again if the version number changes.</p><p>If a vehicle has more than one camera, each camera will have a different component ID and send its own heartbeat. The GCS should create multiple instances of a camera controller based on the component ID of each camera. All commands are sent to a specific camera by addressing the command to a specific component ID.</p><h3 id="camera-modes"><a href="#camera-modes"class="plugin-anchor"name="camera-modes"><i class="fa fa-link"aria-hidden="true"></i></a>Camera Modes</h3><p>Some cameras must be in a certain mode for still and/or video capture.</p><p>The GCS can determine if it needs to make sure the camera is in the proper mode prior to sending a start capture (image or video) command by checking whether the <a href="../messages/common.html#CAMERA_CAP_FLAGS_HAS_MODES">CAMERA_CAP_FLAGS_HAS_MODES</a> bit is set true in <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION.flags</a>.</p><p>In addition, some cameras can capture images in any mode but with different resolutions. For example, a 20 megapixel camera would take a full resolution image when set to <code>CAMERA_MODE_IMAGE</code> but only at the current video resolution if it is set to <code>CAMERA_MODE_VIDEO</code>.</p><p>To get the current mode, the GCS would send a <a href="../messages/common.html#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a> command asking for <a href="../messages/common.html#CAMERA_SETTINGS">CAMERA_SETTINGS</a>. The camera component will then respond with the <a href="../messages/common.html#COMMAND_ACK">COMMAND_ACK</a> message containing a result. On success (<code>COMMAND_ACK.result</code> is <a href="../messages/common.html#MAV_RESULT_ACCEPTED">MAV_RESULT_ACCEPTED</a>) the camera must then send a <a href="../messages/common.html#CAMERA_SETTINGS">CAMERA_SETTINGS</a> message. The current mode is the <code>CAMERA_SETTINGS.mode_id</code> field.</p><p>The sequence is shown below:</p><p><a href="https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIEdDUy0-PkNhbWVyYTogTUFWX0NNRF9SRVFVRVNUX01FU1NBR0UocGFyYW0xPTI2MClcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IENPTU1BTkRfQUNLXG4gICAgTm90ZSBvdmVyIENhbWVyYSxHQ1M6IElmIE1BVl9SRVNVTFRfQUNDRVBURUQgc2VuZCBpbmZvLlxuICAgIENhbWVyYS0-PkdDUzogQ0FNRVJBX1NFVFRJTkdTIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifSwidXBkYXRlRWRpdG9yIjpmYWxzZX0"target="_blank"><img alt="Camera Settings"src="https://mermaid.ink/img/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIEdDUy0-PkNhbWVyYTogTUFWX0NNRF9SRVFVRVNUX01FU1NBR0UocGFyYW0xPTI2MClcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IENPTU1BTkRfQUNLXG4gICAgTm90ZSBvdmVyIENhbWVyYSxHQ1M6IElmIE1BVl9SRVNVTFRfQUNDRVBURUQgc2VuZCBpbmZvLlxuICAgIENhbWVyYS0-PkdDUzogQ0FNRVJBX1NFVFRJTkdTIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifSwidXBkYXRlRWRpdG9yIjpmYWxzZX0"></a></p><blockquote class="alert clearfix alert-info"><strong class="fa fa-2x fa-edit"></strong><p>Command acknowledgment and message resending is handled in the same way as for <a href="#camera_identification">camera identification</a> (if a successful ACK is received the camera will expect the <code>CAMERA_SETTINGS</code> message, and repeat the cycle - up to 3 times - until it is received).</p></blockquote><p>To set the camera to a specific mode, the GCS would send the <a href="../messages/common.html#MAV_CMD_SET_CAMERA_MODE">MAV_CMD_SET_CAMERA_MODE</a> command with the appropriate mode.</p><p>The sequence is shown below:</p><p><a href="https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIEdDUy0-PkNhbWVyYTogTUFWX0NNRF9TRVRfQ0FNRVJBX01PREVcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IENPTU1BTkRfQUNLXG4gICAgTm90ZSBvdmVyIENhbWVyYSxHQ1M6IElmIE1BVl9SRVNVTFRfQUNDRVBURUQsIG1vZGUgd2FzIGNoYW5nZWQuIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifSwidXBkYXRlRWRpdG9yIjpmYWxzZX0"target="_blank"><img alt=""src="https://mermaid.ink/img/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIEdDUy0-PkNhbWVyYTogTUFWX0NNRF9TRVRfQ0FNRVJBX01PREVcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IENPTU1BTkRfQUNLXG4gICAgTm90ZSBvdmVyIENhbWVyYSxHQ1M6IElmIE1BVl9SRVNVTFRfQUNDRVBURUQsIG1vZGUgd2FzIGNoYW5nZWQuIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifSwidXBkYXRlRWRpdG9yIjpmYWxzZX0"></a></p><blockquote class="alert clearfix alert-info"><strong class="fa fa-2x fa-edit"></strong><p>The operation follows the normal <a href="command.html">Command Protocol</a> rules for command/acknowledgment.</p></blockquote><h3 id="storage-status"><a href="#storage-status"class="plugin-anchor"name="storage-status"><i class="fa fa-link"aria-hidden="true"></i></a>Storage Status</h3><p>Before capturing images and/or videos, a GCS should query the storage status to determine if the camera has enough free space for these operations (and provide the user with feedback as to the current storage status). The GCS will send the <a href="../messages/common.html#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a> command and it expects a <a href="../messages/common.html#COMMAND_ACK">COMMAND_ACK</a> message back as well as a <a href="../messages/common.html#STORAGE_INFORMATION">STORAGE_INFORMATION</a> response. For formatting (or erasing depending on your implementation), the GCS will send a <a href="../messages/common.html#MAV_CMD_STORAGE_FORMAT">MAV_CMD_STORAGE_FORMAT</a> command.</p><h3 id="camera-capture-status"><a href="#camera-capture-status"class="plugin-anchor"name="camera-capture-status"><i class="fa fa-link"aria-hidden="true"></i></a>Camera Capture Status</h3><p>In addition to querying about storage status, the GCS will also request the current <em>Camera Capture Status</em> in order to provide the user with proper UI indicators. The GCS will send a <a href="../messages/common.html#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a> command asking for [<a href="../messages/common.html#CAMERA_CAPTURE_STATUS">CAMERA_CAPTURE_STATUS</a>] and it expects a <a href="../messages/common.html#COMMAND_ACK">COMMAND_ACK</a> message back as well as a <a href="../messages/common.html#CAMERA_CAPTURE_STATUS">CAMERA_CAPTURE_STATUS</a> response.</p><h3 id="still-image-capture"><a href="#still-image-capture"class="plugin-anchor"name="still-image-capture"><i class="fa fa-link"aria-hidden="true"></i></a>Still Image Capture</h3><p>A camera supports <em>still image capture</em> if the <a href="../messages/common.html#CAMERA_CAP_FLAGS_CAPTURE_IMAGE">CAMERA_CAP_FLAGS_CAPTURE_IMAGE</a> bit is set in <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION.flags</a>.</p><p>A GCS/MAVLink app uses the <a href="../messages/common.html#MAV_CMD_IMAGE_START_CAPTURE">MAV_CMD_IMAGE_START_CAPTURE</a> command to request that the camera capture a specified number of images (or forever), and the duration between them. The camera immediately returns the normal command acknowledgment (<a href="../messages/common.html#MAV_RESULT_ACCEPTED">MAV_RESULT</a>).</p><p>Each time an image is captured, the camera <em>broadcasts</em> a <a href="../messages/common.html#CAMERA_IMAGE_CAPTURED">CAMERA_IMAGE_CAPTURED</a> message. This message not only tells the GCS the image was captured, it is also intended for geo-tagging.</p><blockquote class="alert clearfix alert-info"><strong class="fa fa-2x fa-edit"></strong><p>The camera must iterate <code>CAMERA_IMAGE_CAPTURED.image_index</code> and the counter used in <code>CAMERA_CAPTURE_STATUS.image_count</code> for every <em>new</em> image capture (these values iterate until explicitly cleared using <a href="#MAV_CMD_STORAGE_FORMAT">MAV_CMD_STORAGE_FORMAT</a>). The index and total image count can be used to <a href="#missing_images">re-request missing images</a> (e.g. images captured when the vehicle was out of telemetry range).</p></blockquote><p>The <a href="../messages/common.html#MAV_CMD_IMAGE_STOP_CAPTURE">MAV_CMD_IMAGE_STOP_CAPTURE</a> command can optionally be sent to stop an image capture sequence (this is needed if image capture has been set to continue forever).</p><p>The still image capture message sequence <em>for missions</em> (as described above) is shown below:</p><p><a href="https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIEdDUy0-PkNhbWVyYTogTUFWX0NNRF9JTUFHRV9TVEFSVF9DQVBUVVJFIChpbnRlcnZhbCwgY291bnQvZm9yZXZlcilcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IE1BVl9SRVNVTFRfQUNDRVBURURcbiAgICBOb3RlIG92ZXIgQ2FtZXJhLEdDUzogQ2FtZXJhIHN0YXJ0IGNhcHR1cmUgb2YgXCJjb3VudFwiIGltYWdlcyBhdCBcImludGVydmFsXCJcbiAgICBDYW1lcmEtPj5HQ1M6IENBTUVSQV9JTUFHRV9DQVBUVVJFRCAgKGJyb2FkY2FzdClcbiAgICBDYW1lcmEtPj5HQ1M6IC4uLlxuICAgIENhbWVyYS0-PkdDUzogQ0FNRVJBX0lNQUdFX0NBUFRVUkVEIChicm9hZGNhc3QpXG4gICAgTm90ZSBvdmVyIENhbWVyYSxHQ1M6IChPcHRpb25hbCkgU3RvcCBjYXB0dXJlXG4gICAgR0NTLT4-Q2FtZXJhOiBNQVZfQ01EX0lNQUdFX1NUT1BfQ0FQVFVSRVxuICAgIEdDUy0-PkdDUzogU3RhcnQgdGltZW91dFxuICAgIENhbWVyYS0-PkdDUzogTUFWX1JFU1VMVF9BQ0NFUFRFRCIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9"target="_blank"><img alt="Mermaid Sequence: Image capture"src="https://mermaid.ink/img/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIEdDUy0-PkNhbWVyYTogTUFWX0NNRF9JTUFHRV9TVEFSVF9DQVBUVVJFIChpbnRlcnZhbCwgY291bnQvZm9yZXZlcilcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IE1BVl9SRVNVTFRfQUNDRVBURURcbiAgICBOb3RlIG92ZXIgQ2FtZXJhLEdDUzogQ2FtZXJhIHN0YXJ0IGNhcHR1cmUgb2YgXCJjb3VudFwiIGltYWdlcyBhdCBcImludGVydmFsXCJcbiAgICBDYW1lcmEtPj5HQ1M6IENBTUVSQV9JTUFHRV9DQVBUVVJFRCAgKGJyb2FkY2FzdClcbiAgICBDYW1lcmEtPj5HQ1M6IC4uLlxuICAgIENhbWVyYS0-PkdDUzogQ0FNRVJBX0lNQUdFX0NBUFRVUkVEIChicm9hZGNhc3QpXG4gICAgTm90ZSBvdmVyIENhbWVyYSxHQ1M6IChPcHRpb25hbCkgU3RvcCBjYXB0dXJlXG4gICAgR0NTLT4-Q2FtZXJhOiBNQVZfQ01EX0lNQUdFX1NUT1BfQ0FQVFVSRVxuICAgIEdDUy0-PkdDUzogU3RhcnQgdGltZW91dFxuICAgIENhbWVyYS0-PkdDUzogTUFWX1JFU1VMVF9BQ0NFUFRFRCIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9"></a></p><p>The message sequence for <em>interactive user-initiated image capture</em> through a GUI is slightly different. In this case the GCS should:</p><ul><li>Confirm that the camera is <em>ready</em> to take images before allowing the user to request image capture.<ul><li>It does this by by sending <a href="../messages/common.html#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a> asking for <a href="../messages/common.html#CAMERA_CAPTURE_STATUS">CAMERA_CAPTURE_STATUS</a>.</li><li>The camera should return a <code>MAV_RESULT</code> and then <a href="../messages/common.html#CAMERA_CAPTURE_STATUS">CAMERA_CAPTURE_STATUS</a>.</li><li>The GCS should check that the status is &quot;Idle&quot; before enabling camera capture in the GUI.</li></ul></li><li>Send <a href="../messages/common.html#MAV_CMD_IMAGE_START_CAPTURE">MAV_CMD_IMAGE_START_CAPTURE</a> specifying a single image (only).</li></ul><p>The sequence is as shown below:</p><p><a href="https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIEdDUy0-PkNhbWVyYTogTUFWX0NNRF9SRVFVRVNUX01FU1NBR0UocGFyYW0xPTI2MilcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IE1BVl9SRVNVTFRfQUNDRVBURURcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IENBTUVSQV9DQVBUVVJFX1NUQVRVUyAoc3RhdHVzKVxuICAgIE5vdGUgb3ZlciBDYW1lcmEsR0NTOiBSZXBlYXQgdW50aWwgc3RhdHVzIGlzIElETEVcbiAgICBHQ1MtPj5DYW1lcmE6IE1BVl9DTURfSU1BR0VfU1RBUlRfQ0FQVFVSRSAoaW50ZXJ2YWwsIGNvdW50L2ZvcmV2ZXIpXG4gICAgR0NTLT4-R0NTOiBTdGFydCB0aW1lb3V0XG4gICAgQ2FtZXJhLT4-R0NTOiBNQVZfUkVTVUxUX0FDQ0VQVEVEXG4gICAgTm90ZSBvdmVyIENhbWVyYSxHQ1M6IENhbWVyYSBzdGFydCBjYXB0dXJlIG9mIDEgaW1hZ2VcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IENBTUVSQV9JTUFHRV9DQVBUVVJFRCAgKGJyb2FkY2FzdCkiLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ"target="_blank"><img alt="Mermaid Sequence: Interactive user intiated image capture"src="https://mermaid.ink/img/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIEdDUy0-PkNhbWVyYTogTUFWX0NNRF9SRVFVRVNUX01FU1NBR0UocGFyYW0xPTI2MilcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IE1BVl9SRVNVTFRfQUNDRVBURURcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IENBTUVSQV9DQVBUVVJFX1NUQVRVUyAoc3RhdHVzKVxuICAgIE5vdGUgb3ZlciBDYW1lcmEsR0NTOiBSZXBlYXQgdW50aWwgc3RhdHVzIGlzIElETEVcbiAgICBHQ1MtPj5DYW1lcmE6IE1BVl9DTURfSU1BR0VfU1RBUlRfQ0FQVFVSRSAoaW50ZXJ2YWwsIGNvdW50L2ZvcmV2ZXIpXG4gICAgR0NTLT4-R0NTOiBTdGFydCB0aW1lb3V0XG4gICAgQ2FtZXJhLT4-R0NTOiBNQVZfUkVTVUxUX0FDQ0VQVEVEXG4gICAgTm90ZSBvdmVyIENhbWVyYSxHQ1M6IENhbWVyYSBzdGFydCBjYXB0dXJlIG9mIDEgaW1hZ2VcbiAgICBHQ1MtPj5HQ1M6IFN0YXJ0IHRpbWVvdXRcbiAgICBDYW1lcmEtPj5HQ1M6IENBTUVSQV9JTUFHRV9DQVBUVVJFRCAgKGJyb2FkY2FzdCkiLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9LCJ1cGRhdGVFZGl0b3IiOmZhbHNlfQ"></a></p><h3 id="missing_images"><a href="#missing_images"class="plugin-anchor"name="missing_images"><i class="fa fa-link"aria-hidden="true"></i></a>Request Lost CAMERA_IMAGE_CAPTURED Messages</h3><p>The camera broadcasts a <a href="#CAMERA_IMAGE_CAPTURED">CAMERA_IMAGE_CAPTURED</a> every time a new image is captured, iterating both the current image index (<code>CAMERA_IMAGE_CAPTURED.image_index</code>) and the total image count (<code>CAMERA_CAPTURE_STATUS.image_count</code>).</p><p>These messages can be lost during transmission; for example if the vehicle is out of data-link range of the ground stations.</p><p>Lost image capture messages can be detected by comparing GCS and camera image counts. Individual entries can be requested using <a href="../messages/common.html#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a>, where <code>param1=&quot;MAVLINK_MSG_ID_CAMERA_IMAGE_CAPTURED&quot;</code> and <code>param2=&quot;the index of the missing image&quot;</code>.</p><p>The camera image log iterates &quot;forever&quot; (but may be explicitly reset using <a href="../messages/common.html#MAV_CMD_STORAGE_FORMAT">MAV_CMD_STORAGE_FORMAT.param3=1</a>).</p><h3 id="video-capture"><a href="#video-capture"class="plugin-anchor"name="video-capture"><i class="fa fa-link"aria-hidden="true"></i></a>Video Capture</h3><p>A camera supports video capture if the <a href="../messages/common.html#CAMERA_CAP_FLAGS_CAPTURE_VIDEO">CAMERA_CAP_FLAGS_CAPTURE_VIDEO</a> bit is set in <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION.flags</a>.</p><p>To start recording videos, the GCS uses the <a href="../messages/common.html#MAV_CMD_VIDEO_START_CAPTURE">MAV_CMD_VIDEO_START_CAPTURE</a> command. If requested, the <a href="#CAMERA_CAPTURE_STATUS">CAMERA_CAPTURE_STATUS</a> message is sent to the GCS at a set interval.</p><p>To stop recording, the GCS uses the <a href="../messages/common.html#MAV_CMD_VIDEO_STOP_CAPTURE">MAV_CMD_VIDEO_STOP_CAPTURE</a> command.</p><h3 id="video_streaming"><a href="#video_streaming"class="plugin-anchor"name="video_streaming"><i class="fa fa-link"aria-hidden="true"></i></a>Video Streaming</h3><blockquote class="alert clearfix alert-info"><strong class="fa fa-2x fa-edit"></strong><p>The GCS should already have identified all connected cameras by their heartbeat and followed the <a href="#camera_identification">Camera Identification</a> steps to get <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION</a> for every camera.</p></blockquote><p>A camera is capable of streaming video if it sets the <a href="../messages/common.html#CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM">CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM</a> bit set in <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION.flags</a>.</p><p>The sequence for requesting <em>all</em> video streams from a particular camera is shown below:</p><p><a href="https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIE5vdGUgb3ZlciBHQ1MsQ2FtZXJhOiBJRiBDQU1FUkFfQ0FQX0ZMQUdTX0hBU19WSURFT19TVFJFQU08YnI-aW4gQ0FNRVJBX0lORk9STUFUSU9OLmZsYWdzPGJyPnJlcXVlc3QgYWxsIHN0cmVhbXMuXG4gICAgR0NTLT4-Q2FtZXJhOiBNQVZfQ01EX1JFUVVFU1RfTUVTU0FHRShwYXJhbTE9MjY5LHBhcmFtMj0wKVxuICAgIEdDUy0-PkdDUzogU3RhcnQgdGltZW91dFxuICAgIENhbWVyYS0-PkdDUzogTUFWX1JFU1VMVF9BQ0NFUFRFRFxuICAgIE5vdGUgb3ZlciBDYW1lcmEsR0NTOiBDYW1lcmEgc2VuZHMgaW5mb3JtYXRpb24gZm9yPGJyPiBhbGwgc3RyZWFtcy5cbiAgICBDYW1lcmEtPj5HQ1M6IFZJREVPX1NUUkVBTV9JTkZPUk1BVElPTiAoMSlcbiAgICBDYW1lcmEtPj5HQ1M6IC4uLlxuICAgIENhbWVyYS0-PkdDUzogVklERU9fU1RSRUFNX0lORk9STUFUSU9OIChuKSIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9"target="_blank"><img alt="Mermaid Sequence: Video stream info"src="https://mermaid.ink/img/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtO1xuICAgIHBhcnRpY2lwYW50IEdDU1xuICAgIHBhcnRpY2lwYW50IENhbWVyYVxuICAgIE5vdGUgb3ZlciBHQ1MsQ2FtZXJhOiBJRiBDQU1FUkFfQ0FQX0ZMQUdTX0hBU19WSURFT19TVFJFQU08YnI-aW4gQ0FNRVJBX0lORk9STUFUSU9OLmZsYWdzPGJyPnJlcXVlc3QgYWxsIHN0cmVhbXMuXG4gICAgR0NTLT4-Q2FtZXJhOiBNQVZfQ01EX1JFUVVFU1RfTUVTU0FHRShwYXJhbTE9MjY5LHBhcmFtMj0wKVxuICAgIEdDUy0-PkdDUzogU3RhcnQgdGltZW91dFxuICAgIENhbWVyYS0-PkdDUzogTUFWX1JFU1VMVF9BQ0NFUFRFRFxuICAgIE5vdGUgb3ZlciBDYW1lcmEsR0NTOiBDYW1lcmEgc2VuZHMgaW5mb3JtYXRpb24gZm9yPGJyPiBhbGwgc3RyZWFtcy5cbiAgICBDYW1lcmEtPj5HQ1M6IFZJREVPX1NUUkVBTV9JTkZPUk1BVElPTiAoMSlcbiAgICBDYW1lcmEtPj5HQ1M6IC4uLlxuICAgIENhbWVyYS0-PkdDUzogVklERU9fU1RSRUFNX0lORk9STUFUSU9OIChuKSIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9"></a></p><p>The steps are:</p><ol><li>GCS follows the <a href="#camera_identification">Camera Identification</a> steps to get <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION</a> for every camera.</li><li>GCS checks if <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION.flags</a> contains the <a href="../messages/common.html#CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM">CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM</a> flag.</li><li>If so, the GCS sends the <a href="../messages/common.html#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a> message to the camera requesting the video streaming configuration (<code>param1=269</code>) for all streams (<code>param2=0</code>).<blockquote class="alert clearfix alert-info"><strong class="fa fa-2x fa-edit"></strong><p>A GCS can also request information for a <em>particular stream</em> by setting its id in <code>param2</code>.</p></blockquote></li><li>Camera returns a <a href="../messages/common.html#VIDEO_STREAM_INFORMATION">VIDEO_STREAM_INFORMATION</a> message for the specified stream or all streams it supports.</li></ol><blockquote class="alert clearfix alert-info"><strong class="fa fa-2x fa-edit"></strong><p>If your camera only provides video streaming and nothing else (no camera features), the <a href="../messages/common.html#CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM">CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM</a> flag is the only flag you need to set. The GCS will then provide video streaming support and skip camera control.</p></blockquote><h3 id="camera-tracking"><a href="#camera-tracking"class="plugin-anchor"name="camera-tracking"><i class="fa fa-link"aria-hidden="true"></i></a>Camera Tracking</h3><p>A camera may support tracking a point and/or a rectangle. Information about the tracked point can be streamed during tracking, and may be passed to a gimbal in order to move the camera to track the target (or control vehicle attitude to track the target).</p><p>Support for tracking different types of targets is indicated by the <a href="../messages/common.html#CAMERA_CAP_FLAGS_HAS_TRACKING_POINT">CAMERA_CAP_FLAGS_HAS_TRACKING_POINT</a> and/or <a href="../messages/common.html#CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE">CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE</a> flags in <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION.flags</a>.</p><p>To start camera tracking a GCS uses either the <a href="#MAV_CMD_CAMERA_TRACK_POINT">MAV_CMD_CAMERA_TRACK_POINT</a> or <a href="#MAV_CMD_CAMERA_TRACK_RECTANGLE">MAV_CMD_CAMERA_TRACK_RECTANGLE</a> command.</p><p>After starting camera tracking you should call <a href="../messages/common.html#MAV_CMD_SET_MESSAGE_INTERVAL">MAV_CMD_SET_MESSAGE_INTERVAL</a> to start streaming the <a href="#CAMERA_TRACKING_IMAGE_STATUS">CAMERA_TRACKING_IMAGE_STATUS</a> message at your desired rate. This message contains information about the tracked point/rectangle in an image, and may be used by the receiving system to determine the location of the target (alongside other information like the <a href="#CAMERA_FOV_STATUS">CAMERA_FOV_STATUS</a>).</p><p>If geo-tracking status information is supported (indicated by <code>CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS</code>) you should also call <a href="../messages/common.html#MAV_CMD_SET_MESSAGE_INTERVAL">MAV_CMD_SET_MESSAGE_INTERVAL</a> to stream <a href="#CAMERA_TRACKING_GEO_STATUS">CAMERA_TRACKING_GEO_STATUS</a> at your desired rate. This message provides the location of the target in physical co-ordinates that can be passed to a gimbal.</p><p>To stop any kind of tracking, a GCS uses the <a href="#MAV_CMD_CAMERA_STOP_TRACKING">MAV_CMD_CAMERA_STOP_TRACKING</a> command. After stopping tracking you should call <code>MAV_CMD_SET_MESSAGE_INTERVAL</code> to stop streaming <code>CAMERA_TRACKING_IMAGE_STATUS</code> and <code>CAMERA_TRACKING_GEO_STATUS</code> (set their rates to 0).</p><h4 id="camera-tracking-message-sequence"><a href="#camera-tracking-message-sequence"class="plugin-anchor"name="camera-tracking-message-sequence"><i class="fa fa-link"aria-hidden="true"></i></a>Camera tracking message sequence</h4><blockquote class="alert clearfix alert-info"><strong class="fa fa-2x fa-edit"></strong><p>The GCS should already have identified all connected cameras by their heartbeat and followed the <a href="#camera_identification">Camera Identification</a> steps to get <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION</a> for every camera.</p></blockquote><p>The sequence for tracking a point is shown below (tracking a rectangle is the same sequence but a different tracking command).</p><p><a href="https://mermaid-js.github.io/mermaid-live-editor/edit#pako:eNqlVGFvmzAQ_SuWP6USi5ZKWyW2RLIIYWgBIkz7CQm54CTWgs2M2VRV_e8zmCyobaImAQkd9t299853foa5KCi0YU1_N5TndM7IRpLyW8qBfioiFctZRbgCnoPfLjqkpJKY9VAoCsQfKltXy-zYwF8ABwVujDIHrbLFEnk4-4FwlsTI-emHXraK_DD5_ihnjO89_XARxQFK_Cgcr3dkU7fboFYaGChJ8l-Mb0AlGFcGWeN9ms32iAF6yJxgnvXJOiCDMgIp7MIA42shS6KY4CkENyaNSaAz6XwmTezi-2WSIcdxV4k7b91Sbt43im2AqdIkJSVly08SRVveQxqtXj9AnpvhBCX3-BR97CZZ4GLcemvubvyAliNde1JOprd3X6zOvJ1OPhvrbjo5R8YHyIPXzD036nm3ukZ1U1VCnwirAanrpqRgSyW9uVzT16s0vVZlQqwuwNi9vvrQQ4M2AJpHrbcE2LDykezeBT51lmA0-VDMoYqHCPBe4Hg8Pjcfv4B1G3OqdvqjCyeqQdkILwa98ndLOdA_xdOxsxpMI06i1X8mx0p2tGevmpRLB-WqVj4fFFpQe5SEFfpafu6uHKi2tKQptLVZ0DVpdiqFKX_Rrk1V6FF1C6aEhPaa7GpqQdIogZ94Dm0lG7p36q_23uvlH-Jn1w4"target="_blank"><img alt="Mermaid Sequence: tracking info"src="https://mermaid.ink/img/pako:eNqlVGFvmzAQ_SuWP6USi5ZKWyW2RLIIYWgBIkz7CQm54CTWgs2M2VRV_e8zmCyobaImAQkd9t299853foa5KCi0YU1_N5TndM7IRpLyW8qBfioiFctZRbgCnoPfLjqkpJKY9VAoCsQfKltXy-zYwF8ABwVujDIHrbLFEnk4-4FwlsTI-emHXraK_DD5_ihnjO89_XARxQFK_Cgcr3dkU7fboFYaGChJ8l-Mb0AlGFcGWeN9ms32iAF6yJxgnvXJOiCDMgIp7MIA42shS6KY4CkENyaNSaAz6XwmTezi-2WSIcdxV4k7b91Sbt43im2AqdIkJSVly08SRVveQxqtXj9AnpvhBCX3-BR97CZZ4GLcemvubvyAliNde1JOprd3X6zOvJ1OPhvrbjo5R8YHyIPXzD036nm3ukZ1U1VCnwirAanrpqRgSyW9uVzT16s0vVZlQqwuwNi9vvrQQ4M2AJpHrbcE2LDykezeBT51lmA0-VDMoYqHCPBe4Hg8Pjcfv4B1G3OqdvqjCyeqQdkILwa98ndLOdA_xdOxsxpMI06i1X8mx0p2tGevmpRLB-WqVj4fFFpQe5SEFfpafu6uHKi2tKQptLVZ0DVpdiqFKX_Rrk1V6FF1C6aEhPaa7GpqQdIogZ94Dm0lG7p36q_23uvlH-Jn1w4?type=png"></a></p><p>The steps are:</p><ol><li>GCS follows the <a href="#camera_identification">Camera Identification</a> steps to get <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION</a> for every camera.</li><li>GCS checks if <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION.flags</a> contains the <code>CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE</code>, <code>CAMERA_CAP_FLAGS_HAS_TRACKING_POINT</code>, <code>CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS</code>.</li><li>If tracking is supported the GCS sends the command to start the type of tracking it wants to do: <a href="#MAV_CMD_CAMERA_TRACK_POINT">MAV_CMD_CAMERA_TRACK_POINT</a> or <a href="#MAV_CMD_CAMERA_TRACK_RECTANGLE">MAV_CMD_CAMERA_TRACK_RECTANGLE</a>. The sequence above just shows point tracking.</li><li>Set the desired rates (intervals) for streaming the tracking status messages.</li><li>Camera streams <a href="#CAMERA_TRACKING_IMAGE_STATUS">CAMERA_TRACKING_IMAGE_STATUS</a> and/or <a href="#CAMERA_TRACKING_GEO_STATUS">CAMERA_TRACKING_GEO_STATUS</a>. These are used to provide camera targetting information.</li><li>To stop tracking, a GCS uses the <a href="#MAV_CMD_CAMERA_STOP_TRACKING">MAV_CMD_CAMERA_STOP_TRACKING</a> command. The streaming intervals must also be set to zero.</li></ol><h3 id="battery-status"><a href="#battery-status"class="plugin-anchor"name="battery-status"><i class="fa fa-link"aria-hidden="true"></i></a>Battery Status</h3><p>Camera components that are powered from their own battery should publish <a href="../messages/common.html#BATTERY_STATUS">BATTERY_STATUS</a> messages.</p><p>Other components like a GCS will typically only use the camera <code>BATTERY_STATUS.battery_remaining</code> field (or possibly <code>time_remaining</code>); generally other fields can be set as &quot;not supported&quot;.</p><h2 id="messagecommandenum-summary"><a href="#messagecommandenum-summary"class="plugin-anchor"name="messagecommandenum-summary"><i class="fa fa-link"aria-hidden="true"></i></a>Message/Command/Enum Summary</h2><h3 id="messages"><a href="#messages"class="plugin-anchor"name="messages"><i class="fa fa-link"aria-hidden="true"></i></a>Messages</h3><table><thead><tr><th>Message</th><th>Description</th></tr></thead><tbody><tr><td><a id="CAMERA_INFORMATION"></a><a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION</a></td><td>Basic information about camera including supported features and URI link to extended information (<code>cam_definition_uri</code> field).</td></tr><tr><td><a id="CAMERA_SETTINGS"></a><a href="../messages/common.html#CAMERA_SETTINGS">CAMERA_SETTINGS</a></td><td>Timestamp and camera mode information.</td></tr><tr><td><a id="VIDEO_STREAM_INFORMATION"></a><a href="../messages/common.html#VIDEO_STREAM_INFORMATION">VIDEO_STREAM_INFORMATION</a></td><td>Information defining a video stream configuration. If a camera has more than one video stream, it would send one of this for each video stream, with their specific configuration. Each stream must have its own, unique <code>stream_id</code>.</td></tr><tr><td><a id="VIDEO_STREAM_STATUS"></a><a href="../messages/common.html#VIDEO_STREAM_STATUS">VIDEO_STREAM_STATUS</a></td><td>Information updating a video stream configuration.</td></tr><tr><td><a id="storage_information"></a><a href="../messages/common.html#STORAGE_INFORMATION">STORAGE_INFORMATION</a></td><td>Storage information (e.g. number and type of storage devices, total/used/available capacity, read/write speeds).</td></tr><tr><td><a id="CAMERA_CAPTURE_STATUS"></a><a href="../messages/common.html#CAMERA_CAPTURE_STATUS">CAMERA_CAPTURE_STATUS</a></td><td>Camera capture status, including current capture type (if any), capture interval, available capacity.</td></tr><tr><td><a id="CAMERA_IMAGE_CAPTURED"></a><a href="../messages/common.html#CAMERA_IMAGE_CAPTURED">CAMERA_IMAGE_CAPTURED</a></td><td>Information about image captured (returned to GPS every time an image is captured).</td></tr><tr><td><a id="CAMERA_FOV_STATUS"></a><a href="../messages/common.html#CAMERA_FOV_STATUS">CAMERA_FOV_STATUS</a></td><td>Information about the field of view of a camera. Requested using <a href="#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a>.</td></tr><tr><td><a id="CAMERA_TRACKING_IMAGE_STATUS"></a><a href="../messages/common.html#CAMERA_TRACKING_IMAGE_STATUS">CAMERA_TRACKING_IMAGE_STATUS</a></td><td>Camera tracking status, sent while in active tracking. Use <a href="../messages/common.html#MAV_CMD_SET_MESSAGE_INTERVAL">MAV_CMD_SET_MESSAGE_INTERVAL</a> to define message interval.</td></tr><tr><td><a id="CAMERA_TRACKING_GEO_STATUS"></a><a href="../messages/common.html#CAMERA_TRACKING_GEO_STATUS">CAMERA_TRACKING_GEO_STATUS</a></td><td>Camera tracking status, sent while in active tracking. Use <a href="../messages/common.html#MAV_CMD_SET_MESSAGE_INTERVAL">MAV_CMD_SET_MESSAGE_INTERVAL</a> to define message interval.</td></tr></tbody></table><h3 id="commands"><a href="#commands"class="plugin-anchor"name="commands"><i class="fa fa-link"aria-hidden="true"></i></a>Commands</h3><table><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><a id="MAV_CMD_REQUEST_MESSAGE"></a><a href="../messages/common.html#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a></td><td>Send command to request any message (used to request <a href="#CAMERA_INFORMATION">CAMERA_INFORMATION</a> and the other messages above)</td></tr><tr><td><a id="MAV_CMD_SET_CAMERA_MODE"></a><a href="../messages/common.html#MAV_CMD_SET_CAMERA_MODE">MAV_CMD_SET_CAMERA_MODE</a></td><td>Send command to set <a href="#CAMERA_MODE">CAMERA_MODE</a>.</td></tr><tr><td><a id="MAV_CMD_IMAGE_START_CAPTURE"></a><a href="../messages/common.html#MAV_CMD_IMAGE_START_CAPTURE">MAV_CMD_IMAGE_START_CAPTURE</a></td><td>Send command to start image capture, specifying the duration between captures and total number of images to capture.</td></tr><tr><td><a id="MAV_CMD_IMAGE_STOP_CAPTURE"></a><a href="../messages/common.html#MAV_CMD_IMAGE_STOP_CAPTURE">MAV_CMD_IMAGE_STOP_CAPTURE</a></td><td>Send command to stop image capture.</td></tr><tr><td><a id="MAV_CMD_VIDEO_START_CAPTURE"></a><a href="../messages/common.html#MAV_CMD_VIDEO_START_CAPTURE">MAV_CMD_VIDEO_START_CAPTURE</a></td><td>Send command to start video capture, specifying the frequency that <a href="#CAMERA_CAPTURE_STATUS">CAMERA_CAPTURE_STATUS</a> messages should be sent while recording.</td></tr><tr><td><a id="MAV_CMD_VIDEO_STOP_CAPTURE"></a><a href="../messages/common.html#MAV_CMD_VIDEO_STOP_CAPTURE">MAV_CMD_VIDEO_STOP_CAPTURE</a></td><td>Send command to stop video capture.</td></tr><tr><td><a id="MAV_CMD_VIDEO_START_STREAMING"></a><a href="../messages/common.html#MAV_CMD_VIDEO_START_STREAMING">MAV_CMD_VIDEO_START_STREAMING</a></td><td>Send command to start video streaming for the given Stream ID (<code>stream_id</code>.) This is mostly for streaming protocols that <em>push</em> a stream. If your camera uses a connection based streaming configuration (RTSP, TCP, etc.), you may ignore it if you don&apos;t need it but note that you still must ACK the command, like all <code>MAV_CMD_XXX</code> commands. When using a connection based streaming configuration, the GCS will connect the stream from its side. When a camera offers more than one stream and the user switches from one stream to another, the GCS will send a <a href="../messages/common.html#MAV_CMD_VIDEO_STOP_STREAMING">MAV_CMD_VIDEO_STOP_STREAMING</a> command targeting the current Stream ID followed by a <a href="../messages/common.html#MAV_CMD_VIDEO_START_STREAMING">MAV_CMD_VIDEO_START_STREAMING</a> targeting the newly selected Stream ID.</td></tr><tr><td><a id="MAV_CMD_VIDEO_STOP_STREAMING"></a><a href="../messages/common.html#MAV_CMD_VIDEO_STOP_STREAMING">MAV_CMD_VIDEO_STOP_STREAMING</a></td><td>Send command to stop video streaming for the given Stream ID (<code>stream_id</code>.) This is mostly for streaming protocols that <em>push</em> a stream. If your camera uses a connection based streaming configuration (RTSP, TCP, etc.), you may ignore it if you don&apos;t need it but note that you still must ACK the command, like all <code>MAV_CMD_XXX</code> commands. When using a connection based streaming configuration, the GCS will disconnect the stream from its side. When a camera offers more than one stream and the user switches from one stream to another, the GCS will send a <a href="../messages/common.html#MAV_CMD_VIDEO_STOP_STREAMING">MAV_CMD_VIDEO_STOP_STREAMING</a> command targeting the current Stream ID followed by a <a href="../messages/common.html#MAV_CMD_VIDEO_START_STREAMING">MAV_CMD_VIDEO_START_STREAMING</a> targeting the newly selected Stream ID.</td></tr><tr><td><a id="MAV_CMD_CAMERA_TRACK_POINT"></a><a href="../messages/common.html#MAV_CMD_CAMERA_TRACK_POINT">MAV_CMD_CAMERA_TRACK_POINT</a></td><td>Initate visual point tracking, if supported by the camera (<a href="#CAMERA_CAP_FLAGS">CAMERA_CAP_FLAGS_HAS_TRACKING_POINT</a> is set).</td></tr><tr><td><a id="MAV_CMD_CAMERA_TRACK_RECTANGLE"></a><a href="../messages/common.html#MAV_CMD_CAMERA_TRACK_RECTANGLE">MAV_CMD_CAMERA_TRACK_RECTANGLE</a></td><td>Initiate visual rectangle tracking, if supported by the camera (<a href="#CAMERA_CAP_FLAGS">CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE</a> is set).</td></tr><tr><td><a id="MAV_CMD_CAMERA_STOP_TRACKING"></a><a href="../messages/common.html#MAV_CMD_CAMERA_STOP_TRACKING">MAV_CMD_CAMERA_STOP_TRACKING</a></td><td>Stop camera tracking (as initiated using <code>MAV_CMD_CAMERA_TRACK_POINT</code> or <code>MAV_CMD_CAMERA_TRACK_RECTANGLE</code>).</td></tr></tbody></table><h4 id="deprecated-commands"><a href="#deprecated-commands"class="plugin-anchor"name="deprecated-commands"><i class="fa fa-link"aria-hidden="true"></i></a>Deprecated Commands</h4><p>These commands have been deprecated, replaced by the generic requester command <a href="#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a></p><table><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><a id="MAV_CMD_REQUEST_CAMERA_SETTINGS"></a><a href="../messages/common.html#MAV_CMD_REQUEST_CAMERA_SETTINGS">MAV_CMD_REQUEST_CAMERA_SETTINGS</a></td><td>Send command to request <a href="#CAMERA_SETTINGS">CAMERA_SETTINGS</a>.</td></tr><tr><td><a id="MAV_CMD_REQUEST_CAMERA_INFORMATION"></a><a href="../messages/common.html#MAV_CMD_REQUEST_CAMERA_INFORMATION">MAV_CMD_REQUEST_CAMERA_INFORMATION</a></td><td>Send command to request <a href="#CAMERA_INFORMATION">CAMERA_INFORMATION</a>.</td></tr><tr><td><a id="MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION"></a><a href="../messages/common.html#MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION">MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION</a></td><td>Send command to request <a href="#VIDEO_STREAM_INFORMATION">VIDEO_STREAM_INFORMATION</a>. This is sent once for each camera when a camera is detected and it has set the <a href="../messages/common.html#CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM">CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM</a> flag within the <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION</a> message <code>flags</code> field.</td></tr><tr><td><a id="MAV_CMD_REQUEST_VIDEO_STREAM_STATUS"></a><a href="../messages/common.html#MAV_CMD_REQUEST_VIDEO_STREAM_STATUS">MAV_CMD_REQUEST_VIDEO_STREAM_STATUS</a></td><td>Send command to request <a href="#VIDEO_STREAM_STATUS">VIDEO_STREAM_STATUS</a>. This is sent whenever there is a mode change (when <a href="../messages/common.html#MAV_CMD_SET_CAMERA_MODE">MAV_CMD_SET_CAMERA_MODE</a> is sent.) It allows the camera to update the stream configuration when a camera mode change occurs.</td></tr><tr><td><a id="MAV_CMD_REQUEST_STORAGE_INFORMATION"></a><a href="../messages/common.html#MAV_CMD_REQUEST_STORAGE_INFORMATION">MAV_CMD_REQUEST_STORAGE_INFORMATION</a></td><td>Send command to request <a href="#storage_information">STORAGE_INFORMATION</a>.</td></tr><tr><td><a id="MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS"></a><a href="../messages/common.html#MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS">MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS</a></td><td>Send command to request <a href="#CAMERA_CAPTURE_STATUS">CAMERA_CAPTURE_STATUS</a>.</td></tr></tbody></table><h3 id="enum"><a href="#enum"class="plugin-anchor"name="enum"><i class="fa fa-link"aria-hidden="true"></i></a>Enum</h3><table><thead><tr><th>Enum</th><th>Description</th></tr></thead><tbody><tr><td><a id="CAMERA_CAP_FLAGS"></a><a href="../messages/common.html#CAMERA_CAP_FLAGS">CAMERA_CAP_FLAGS</a></td><td>Camera capability flags (Bitmap). For example: ability to capture images in video mode, support for survey mode etc. Received in <a href="#CAMERA_INFORMATION">CAMERA_INFORMATION</a>.</td></tr><tr><td><a id="CAMERA_MODE"></a><a href="../messages/common.html#CAMERA_MODE">CAMERA_MODE</a></td><td>Camera mode (image, video, survey etc.). Received in <a href="#CAMERA_SETTINGS">CAMERA_SETTINGS</a>.</td></tr><tr><td><a id="VIDEO_STREAM_TYPE"></a><a href="../messages/common.html#VIDEO_STREAM_TYPE">VIDEO_STREAM_TYPE</a></td><td>Type of stream - e.g. RTSP, MPEG. Received in <a href="#VIDEO_STREAM_INFORMATION">VIDEO_STREAM_INFORMATION</a>.</td></tr><tr><td><a id="VIDEO_STREAM_STATUS_FLAGS"></a><a href="../messages/common.html#VIDEO_STREAM_TYPE">VIDEO_STREAM_STATUS_FLAGS</a></td><td>Bitmap of stream status flags - e.g. zoom, thermal imaging, etc. Received in <a href="#VIDEO_STREAM_INFORMATION">VIDEO_STREAM_INFORMATION</a>.</td></tr><tr><td><a id="CAMERA_TRACKING_STATUS_FLAGS"></a><a href="../messages/common.html#CAMERA_TRACKING_STATUS_FLAGS">CAMERA_TRACKING_STATUS_FLAGS</a></td><td>Current tracking status. Received in <a href="#CAMERA_TRACKING_IMAGE_STATUS">CAMERA_TRACKING_IMAGE_STATUS</a> amd <a href="#CAMERA_TRACKING_GEO_STATUS">CAMERA_TRACKING_GEO_STATUS</a>.</td></tr><tr><td><a id="CAMERA_TRACKING_MODE"></a><a href="../messages/common.html#CAMERA_TRACKING_MODE">CAMERA_TRACKING_MODE</a></td><td>Current tracking mode. Received in <a href="#CAMERA_TRACKING_IMAGE_STATUS">CAMERA_TRACKING_IMAGE_STATUS</a>.</td></tr><tr><td><a id="CAMERA_TRACKING_TARGET_DATA"></a><a href="../messages/common.html#CAMERA_TRACKING_TARGET_DATA">CAMERA_TRACKING_TARGET_DATA</a></td><td>Indicates how target data is encoded in image. Received in <a href="#CAMERA_TRACKING_IMAGE_STATUS">CAMERA_TRACKING_IMAGE_STATUS</a>.</td></tr></tbody></table><h2 id="migration-notes-for-gcs--mavlink-sdks"><a href="#migration-notes-for-gcs--mavlink-sdks"class="plugin-anchor"name="migration-notes-for-gcs--mavlink-sdks"><i class="fa fa-link"aria-hidden="true"></i></a>Migration Notes for GCS &amp; MAVLink SDKs</h2><p>The original definition of this protocol used specific commands to query for each type of information requested from the camera: <a href="../messages/common.html#MAV_CMD_REQUEST_CAMERA_INFORMATION">MAV_CMD_REQUEST_CAMERA_INFORMATION</a> (for <a href="../messages/common.html#CAMERA_INFORMATION">CAMERA_INFORMATION</a>), <a href="../messages/common.html#MAV_CMD_REQUEST_CAMERA_SETTINGS">MAV_CMD_REQUEST_CAMERA_SETTINGS</a>, <a href="../messages/common.html#MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS">MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS</a>, <a href="../messages/common.html#MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION">MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION</a>, <a href="../messages/common.html#MAV_CMD_REQUEST_STORAGE_INFORMATION">MAV_CMD_REQUEST_STORAGE_INFORMATION</a>.</p><p>The latest version replaces all of these specific commands with the general requestor <a href="../messages/common.html#MAV_CMD_REQUEST_MESSAGE">MAV_CMD_REQUEST_MESSAGE</a>.</p><p>The transition works like this:</p><ol><li>Cameras need to handle both approaches for now (i.e. support both new generic and old specific commands).</li><li>Ground stations will move from using the old specific commands to using both. They can try the new one and if they don&apos;t get an answer within a timeout they need to fall back to the previous command.</li><li>After the new commands have been established in server and ground stations, the old specific commands may be removed from the implementations.</li></ol></section></div><div class="search-results"><div class="has-results"><h1 class="search-results-title"><span class="search-results-count"></span> results matching "<span class="search-query"></span>"</h1><ul class="search-results-list"></ul></div><div class="no-results"><h1 class="search-results-title">No results matching "<span class="search-query"></span>"</h1></div></div></div></div></div></div></div><script>var gitbook=gitbook||[];gitbook.push(function(){gitbook.page.hasChanged({page:{title:"Camera Protocol v2",level:"1.6.7",depth:2,next:{title:"Camera Definition Files",level:"1.6.7.1",depth:3,path:"services/camera_def.md",ref:"services/camera_def.md",articles:[]},previous:{title:"Manual Control (Joystick) Protocol",level:"1.6.6",depth:2,path:"services/manual_control.md",ref:"services/manual_control.md",articles:[]},dir:"ltr"},config:{plugins:["theme-api","youtube","anchors","collapsible-menu","page-toc-button","language-picker","custom-favicon","richquotes@git+https://github.com/Dronecode/gitbook-plugin-richquotes.git","bulk-redirect@git+https://github.com/Dronecode/gitbook-plugin-bulk-redirect.git","toolbar@git+https://github.com/hamishwillee/gitbook-plugin-toolbar.git","-mermaid","theme-dronecode@git+https://github.com/dronecode/theme-dronecode.git","html-minifier"],styles:{website:"styles/website.css",pdf:"styles/pdf.css",epub:"styles/epub.css",mobi:"styles/mobi.css",ebook:"styles/ebook.css",print:"styles/print.css"},pluginsConfig:{"theme-dronecode":{logo:{logo_large:"../assets/site/logo_mavlink_header.png",logo_small:"../assets/site/logo_mavlink_header.png",url:"https://mavlink.io/en/"},menu:[{url:"https://mavlink.io/en/messages/common.html",text:"Messages",text_small:"Messages"},{url:"https://mavlink.io/en/about/faq.html",text:"FAQ",text_small:"FAQ"},{url:"https://mavlink.io/en/about/implementations.html",text:"Implementations",text_small:"Implementations"},{url:"https://mavlink.io/en/mavgen_c/examples.html",text:"Examples",text_small:"Examples"},{url:"https://mavlink.io/en/about/support.html",text:"Support",text_small:"Help"}]},"collapsible-menu":{},"language-picker":{"grid-columns":3},youtube:{},search:{},"html-minifier":{customAttrSurround:[],removeScriptTypeAttributes:!1,removeEmptyAttributes:!1,removeRedundantAttributes:!1,removeEmptyElements:!1,sortClassName:!0,caseSensitive:!0,html5:!0,collapseWhitespace:!0,processConditionalComments:!1,quoteCharacter:null,keepClosingSlash:!0,preventAttributesEscaping:!1,minifyURLs:!1,removeAttributeQuotes:!1,decodeEntities:!1,trimCustomFragments:!1,customAttrAssign:[],includeAutoGeneratedTags:!0,collapseInlineTagWhitespace:!1,collapseBooleanAttributes:!0,minifyJS:!0,removeTagWhitespace:!0,preserveLineBreaks:!1,sortAttributes:!0,removeStyleLinkTypeAttributes:!1,removeComments:!0,minifyCSS:!0,processScripts:[],conservativeCollapse:!1,removeOptionalTags:!1,useShortDoctype:!1},lunr:{maxIndexSize:1e6,ignoreSpecialCharacters:!1},fontsettings:{theme:"white",family:"sans",size:2},richquotes:{tip:{alert:"success",picto:"fa-thumbs-o-up"}},highlight:{},favicon:"favicon.ico","page-toc-button":{},"theme-api":{languages:[{lang:"c",name:"C/C++",default:!0},{lang:"python",name:"Python"},{lang:"js",name:"JavaScript"},{lang:"go",name:"Go"}],split:!0,theme:"light"},"bulk-redirect":{basepath:"/",redirectsFile:"redirects.json"},"custom-favicon":{},toolbar:{buttons:[{label:"Bug tracker",icon:"fa fa-bug",position:"left",url:"https://github.com/mavlink/mavlink-devguide/issues/new?title=Doc+Bug:+{{title}}&body=DESCRIBE+PROBLEM+WITH+DOCS+HERE%0A%0ABug+Page:+[{{title}}]({{url}})"},{label:"GitHub",icon:"fa fa-github",url:"https://github.com/mavlink/mavlink-devguide"},{label:"Edit page on github",icon:"fa fa-pencil-square-o",position:"left",url:"https://github.com/mavlink/mavlink-devguide/edit/master/{{filepath_lang}}"}]},sharing:{facebook:!0,twitter:!0,google:!1,weibo:!1,instapaper:!1,vk:!1,all:["facebook","google","twitter","weibo","instapaper"]},"theme-default":{styles:{website:"styles/website.css",pdf:"styles/pdf.css",epub:"styles/epub.css",mobi:"styles/mobi.css",ebook:"styles/ebook.css",print:"styles/print.css"},showLevel:!1},anchors:{}},theme:"default",pdf:{pageNumbers:!0,fontSize:12,fontFamily:"Arial",paperSize:"a4",chapterMark:"pagebreak",pageBreaksBefore:"/",margin:{right:62,left:62,top:56,bottom:56}},structure:{langs:"LANGS.md",readme:"README.md",glossary:"GLOSSARY.md",summary:"SUMMARY.md"},variables:{logo:"./assets/site/logo_mavlink_small.png"},title:"MAVLink Developer Guide",language:"en",gitbook:"*"},file:{path:"services/camera.md",mtime:"2024-08-22T22:56:05.025Z",type:"markdown"},gitbook:{version:"3.2.3",time:"2024-08-22T22:56:58.529Z"},basePath:"..",book:{language:"en"}})})</script></div><script src="../../gitbook/gitbook.js"></script><script src="../../gitbook/theme.js"></script><script src="../../gitbook/gitbook-plugin-collapsible-menu/plugin.js"></script><script src="../../gitbook/gitbook-plugin-page-toc-button/plugin.js"></script><script src="../../gitbook/gitbook-plugin-language-picker/plugin.js"></script><script src="../../gitbook/gitbook-plugin-toolbar/buttons.js"></script><script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script><script src="../../gitbook/gitbook-plugin-search/search.js"></script><script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script><script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script><script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script><script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script><script src="../../gitbook/gitbook-plugin-theme-api/theme-api.js"></script></body></html>